package com.happyabc.starter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnWebApplication
@EnableConfigurationProperties(ExecutionTipProperties.class)
public class ExecutionTipAutoConfiguration {
    @Autowired
    ExecutionTipProperties executionTipProperties;

    @Bean
    public ExecutionTipService helloService() {
        ExecutionTipService service = new ExecutionTipService();
        service.setExecutionTipProperties(executionTipProperties);
        return service;
    }

}
